#ifndef __LEVEL__
#define __LEVEL__
namespace bitlog
{
    class LogLeval
    {
    public:
        enum class value
        {
            UNKNOW = 0,
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF
        };
        static const char *toString(LogLeval::value l)
        {
            switch (l)
            {
            #define TOSTRING(name) #name
            case LogLeval::value::DEBUG: return TOSTRING(DEBUG);
            case LogLeval::value::INFO: return TOSTRING(INFO);
            case LogLeval::value::WARN: return TOSTRING(WARN);
            case LogLeval::value::ERROR: return TOSTRING(ERROR);
            case LogLeval::value::FATAL: return TOSTRING(FATAL);
            case LogLeval::value::OFF: return TOSTRING(OFF);
            }
            return TOSTRING(UNKNOW);
        }
    };
}
#endif